package com.carkeeper.shop.feign;
import com.carkeeper.entity.PageResult;
import com.carkeeper.entity.Result;
import com.carkeeper.shop.pojo.Store;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;
@FeignClient(name = "shop")
public interface StoreFeign {

    @GetMapping("/store/findStoreById")
    public Result<Store> findStoreById(@RequestParam("id") String id);

    /**
     * 分页展示审核中的服务商
     *
     * @param searchMap
     * @param page
     * @param size
     * @return
     */
    @GetMapping("/check/findPage/{page}/{size}")
    public PageResult findPage(@RequestParam Map searchMap, @PathVariable("page") String page, @PathVariable("size") String size);

    /**
     * 已拒绝服务商主体
     *
     * @param searchMap
     * @param page
     * @param size
     * @return
     */
    @GetMapping("/check/turn/{page}/{size}")
    public PageResult turn(@RequestParam Map searchMap, @PathVariable("page") String page, @PathVariable("size") String size);

    /**
     * 展示待商家审核信息
     *
     * @param id
     * @return
     */
    @GetMapping("/check/show/{id}")
    public Result<Store> show(@PathVariable("id") String id);

    /**
     * 审核
     */
    @PutMapping("/check/store/{id}/{status}")
    public Result check(@PathVariable("id") String id, @PathVariable("status") String status);
}
